package zhouyi;
import java.util.Scanner;
public class MainTest {
    public  Pets  print() {
        Pets pets=new Pets();
        System.out.println("欢迎你来到宠物店");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要领养的宠物的名字:");
        String PName = scanner.next();
       pets.setName(PName);
        System.out.println("请输入要领养的宠物的类型(1狗；2企鹅):");
        int type = scanner.nextInt();
        if (type==1) {
            pets.setpType("狗狗");
        }else if(type==2){
            pets.setpType("企鹅");}

            System.out.println("请选择" + pets + "性别(1:Q仔;2:Q妹)");
        int sex=scanner.nextInt();
        String se="";
        if(sex==1){
            se="Q仔";
        }else if (sex==2)
            se="Q妹";
      pets.setSex(se);
        System.out.println("请选择" + pets.getpType() + "的健康值:(1~100)之间");
        int health = scanner.nextInt();
        pets.setHealth(health);
        return pets;

    }
    public Pets PrintTest(String Pname,int heath){
        Pets pets=new Pets();
        pets.setHealth(heath);
        pets.setName(Pname);
        return pets;
    }

        //输出宠物的独白
        public void prite(Pets  pt){
            System.out.println("宠物独白:");
            System.out.println("我的名字:"+pt.getName()+"健康值"+pt.getHealth()
                    +"和主任的亲密度"+pt.getLikeNO()+"我的性别"+pt.getSex());
    }


    }

